package cn.attackme.myuploader.service.impl;

import cn.attackme.myuploader.dao.Growth_periodDao;
import cn.attackme.myuploader.model.Growth_period;
import cn.attackme.myuploader.service.Growth_periodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Service
public class Growth_periodServiceImpl implements Growth_periodService {
    @Autowired
    private Growth_periodDao growth_periodDao;


    @Override
    public Growth_period getPeriod(Long id) {
        return growth_periodDao.getPeriod(id);
    }

    @Override
    public int save(Growth_period growth_period) {
        return growth_periodDao.save(growth_period);
    }

    @Override
    public int update(Growth_period growth_period) {
        return growth_periodDao.update(growth_period);
    }

    @Override
    public int delete(Long id) {
        return growth_periodDao.deleteById(id);
    }

    @Override
    public List<Map<String, Object>> allList() {
        return growth_periodDao.allList();
    }

    @Override
    public List<Map<String, Object>> findByDateList(Date date) {
        return growth_periodDao.findByDateList(date);
    }
}
